﻿using SMARTMobile.WinPhone.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SMARTMobile.Models.UI
{
    /// <summary>
    /// Represents the ARSaleSP whom the current device was registered to.
    /// </summary>
    public class ARSaleSPTypeModel : BaseModel<ARSaleSPTypeModel>
    {
        #region Fields

        private string _siteCode;
        private string _siteName;
        private string _address;
        private string _webServerUrl;
        private string _userCode;
        private string _userName;
        private string _userType;
        private bool _isAdmin;
        private string _registeredDeviceId;
        private int _nextArNo;
        private string _phoneNumber;
        private int _nextMoveNo;
        private string _workDay;
        private int _addinAfterPromotion;
        private int _paycashAfterPromotion;
        private int _firstTabOrder;
        private string _afterVisit;
        private int _checkInLoc;
        private int _managerSerial;
        private string _image;
        private string _appStatus;
        private string _version;
        private string _logo;
        private bool _isOnline;
        private int _orderWhenVisit;
        private string _closedWork;
        private int _localMaxCustKey;
        private string _countShopVisit;
        private string _countShopVisitOnday;

        #endregion

        public ARSaleSPTypeModel()
        { }

        public static ARSaleSPTypeModel CreateTestingDsr()
        {
            return new ARSaleSPTypeModel
            {
                SiteCode = "00",
                SiteName = "00",
                Address = "00",
                WebServerUrl = "sskc.smartbs.vn",
                UserCode = "DSR003",
                UserName = "Nguyen Thanh Phu",
                UserType = "DSR",
                IsAdmin = false,
                RegisteredDeviceId = "64ff3f81e1f8eb08",
                NextArNo = 1,
                PhoneNumber = "0909919193",
                NextMoveNo = 1,
                WorkDay = DateTime.Parse("3/14/2014").ToShortDateString(),
                AddinAfterPromotion = 0,
                PaycashAfterPromotion = 1,
                FirstTabOrder = 2,
                AfterVisit = "1",
                CheckInLoc = 0,
                ManagerSerial = 0,
                Image = string.Empty,
                AppStatus = "0",
                Version = "51",
                Logo = "logo1.PNG",
                IsOnline = true,
                OrderWhenVisit = 1,
                ClosedWork = "20140314",
                LocalMaxCustKey = 0,
                CountShopVisit = "0",
                CountShopVisitOnday = "0"
            };
        }

        #region Properties

        public string SiteCode
        {
            get { return this._siteCode; }
            set
            {
                this._siteCode = value;
                base.RaisePropertyChanged(me => me.SiteCode);
            }
        }

        public string SiteName
        {
            get { return this._siteName; }
            set
            {
                this._siteName = value;
                base.RaisePropertyChanged(me => me.SiteName);
            }
        }

        public string Address
        {
            get { return this._address; }
            set
            {
                this._address = value;
                base.RaisePropertyChanged(me => me.Address);
            }
        }

        public string WebServerUrl
        {
            get { return this._webServerUrl; }
            set
            {
                this._webServerUrl = value;
                base.RaisePropertyChanged(me => me.WebServerUrl);
            }
        }

        public string UserCode
        {
            get { return this._userCode; }
            set
            {
                this._userCode = value;
                base.RaisePropertyChanged(me => me.UserCode);
            }
        }

        public string UserName
        {
            get { return this._userName; }
            set
            {
                this._userName = value;
                base.RaisePropertyChanged(me => me.UserName);
            }
        }

        public string UserType
        {
            get { return this._userType; }
            set
            {
                this._userType = value;
                base.RaisePropertyChanged(me => me.UserType);
            }
        }

        public bool IsAdmin
        {
            get { return this._isAdmin; }
            set
            {
                this._isAdmin = value;
                base.RaisePropertyChanged(me => me.IsAdmin);
            }
        }

        public string RegisteredDeviceId
        {
            get { return this._registeredDeviceId; }
            set
            {
                this._registeredDeviceId = value;
                base.RaisePropertyChanged(me => me.RegisteredDeviceId);
            }
        }

        public int NextArNo
        {
            get { return this._nextArNo; }
            set
            {
                this._nextArNo = value;
                base.RaisePropertyChanged(me => me.NextArNo);
            }
        }

        public string PhoneNumber
        {
            get { return this._phoneNumber; }
            set
            {
                this._phoneNumber = value;
                base.RaisePropertyChanged(me => me.PhoneNumber);
            }
        }

        public int NextMoveNo
        {
            get { return this._nextMoveNo; }
            set
            {
                this._nextMoveNo = value;
                base.RaisePropertyChanged(me => me.NextMoveNo);
            }
        }

        public string WorkDay
        {
            get { return this._workDay; }
            set
            {
                this._workDay = value;
                base.RaisePropertyChanged(me => me.WorkDay);
            }
        }

        public int AddinAfterPromotion
        {
            get { return this._addinAfterPromotion; }
            set
            {
                this._addinAfterPromotion = value;
                base.RaisePropertyChanged(me => me.AddinAfterPromotion);
            }
        }

        public int FirstTabOrder
        {
            get { return this._firstTabOrder; }
            set
            {
                this._firstTabOrder = value;
                base.RaisePropertyChanged(me => me.FirstTabOrder);
            }
        }

        public int PaycashAfterPromotion
        {
            get { return this._paycashAfterPromotion; }
            set
            {
                this._paycashAfterPromotion = value;
                base.RaisePropertyChanged(me => me.PaycashAfterPromotion);
            }
        }

        public string AfterVisit
        {
            get { return this._afterVisit; }
            set
            {
                this._afterVisit = value;
                base.RaisePropertyChanged(me => me.AfterVisit);
            }
        }

        public int CheckInLoc
        {
            get { return this._checkInLoc; }
            set
            {
                this._checkInLoc = value;
                base.RaisePropertyChanged(me => me.CheckInLoc);
            }
        }

        public int ManagerSerial
        {
            get { return this._managerSerial; }
            set
            {
                this._managerSerial = value;
                base.RaisePropertyChanged(me => me.ManagerSerial);
            }
        }

        public string Image
        {
            get { return this._image; }
            set
            {
                this._image = value;
                base.RaisePropertyChanged(me => me.Image);
            }
        }

        public string Version
        {
            get { return this._version; }
            set
            {
                this._version = value;
                base.RaisePropertyChanged(me => me.Version);
            }
        }

        public string AppStatus
        {
            get { return this._appStatus; }
            set
            {
                this._appStatus = value;
                base.RaisePropertyChanged(me => me.AppStatus);
            }
        }

        public string Logo
        {
            get { return this._logo; }
            set
            {
                this._logo = value;
                base.RaisePropertyChanged(me => me.Logo);
            }
        }

        public bool IsOnline
        {
            get { return this._isOnline; }
            set
            {
                this._isOnline = value;
                base.RaisePropertyChanged(me => me.IsOnline);
            }
        }

        public int OrderWhenVisit
        {
            get { return this._orderWhenVisit; }
            set
            {
                this._orderWhenVisit = value;
                base.RaisePropertyChanged(me => me.OrderWhenVisit);
            }
        }

        public string ClosedWork
        {
            get { return this._closedWork; }
            set
            {
                this._closedWork = value;
                base.RaisePropertyChanged(me => me.ClosedWork);
            }
        }

        public int LocalMaxCustKey
        {
            get { return this._localMaxCustKey; }
            set
            {
                this._localMaxCustKey = value;
                base.RaisePropertyChanged(me => me.LocalMaxCustKey);
            }
        }

        public string CountShopVisit
        {
            get { return this._countShopVisit; }
            set
            {
                this._countShopVisit = value;
                base.RaisePropertyChanged(me => me.CountShopVisit);
            }
        }

        public string CountShopVisitOnday
        {
            get { return this._countShopVisitOnday; }
            set
            {
                this._countShopVisitOnday = value;
                base.RaisePropertyChanged(me => me.CountShopVisitOnday);
            }
        }

        #endregion
    }
}
